package Router

import (
	"gitee.com/kisgod/Lamborighi/Server/app/controller"
	"github.com/gin-gonic/gin"
)

func Run(e *gin.Engine) *gin.Engine {
	projectController := controller.ProjectController{}
	e.POST("/project", projectController.Add)
	e.PUT("/project/:id", projectController.Update)
	e.GET("/projects", projectController.GetProjects)

	envController := controller.EnvController{}
	e.GET("/env/:projectId", envController.GetEnv)
	e.PUT("/env/:id", envController.UpdateEnv)
	e.POST("/env", envController.AddEnv)

	return e
}
